using System;
using System.Text;

namespace iBeauty.BusinessObjects
{
	[Serializable()]
	public class SearchSetting
	{
		private string _ID;

		public string ID
		{
			get { return _ID; }
			set { _ID = value; }
		}

		private DateTime? _CreateDate;

		public DateTime? CreateDate
		{
			get { return _CreateDate; }
			set { _CreateDate = value; }
		}

		private DateTime? _ModifiedDate;

		public DateTime? ModifiedDate
		{
			get { return _ModifiedDate; }
			set { _ModifiedDate = value; }
		}

		private DateTime? _TimeStamp;

		public DateTime? TimeStamp
		{
			get { return _TimeStamp; }
			set { _TimeStamp = value; }
		}

		private int? _SearchObject;

		public int? SearchObject
		{
			get { return _SearchObject; }
			set { _SearchObject = value; }
		}

		private string _SearchCondition;

		public string SearchCondition
		{
			get { return _SearchCondition; }
			set { _SearchCondition = value; }
		}

		private string _IsAddResult;

		public string IsAddResult
		{
			get { return _IsAddResult; }
			set { _IsAddResult = value; }
		}

		private string _IsOnResult;

		public string IsOnResult
		{
			get { return _IsOnResult; }
			set { _IsOnResult = value; }
		}

		private int? _AccountId;

		public int? AccountId
		{
			get { return _AccountId; }
			set { _AccountId = value; }
		}

		public SearchSetting()
		{ }

		public SearchSetting(string ID,DateTime? CreateDate,DateTime? ModifiedDate,DateTime? TimeStamp,int? SearchObject,string SearchCondition,string IsAddResult,string IsOnResult,int? AccountId)
		{
			this.ID = ID;
			this.CreateDate = CreateDate;
			this.ModifiedDate = ModifiedDate;
			this.TimeStamp = TimeStamp;
			this.SearchObject = SearchObject;
			this.SearchCondition = SearchCondition;
			this.IsAddResult = IsAddResult;
			this.IsOnResult = IsOnResult;
			this.AccountId = AccountId;
		}

		public override string ToString()
		{
			return "ID = " + ID + ",CreateDate = " + CreateDate.ToString() + ",ModifiedDate = " + ModifiedDate.ToString() + ",TimeStamp = " + TimeStamp.ToString() + ",SearchObject = " + SearchObject.ToString() + ",SearchCondition = " + SearchCondition + ",IsAddResult = " + IsAddResult + ",IsOnResult = " + IsOnResult + ",AccountId = " + AccountId.ToString();
		}

		public class IDComparer : System.Collections.Generic.IComparer<SearchSetting>
		{
			public SorterMode SorterMode;
			public IDComparer()
			{ }
			public IDComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<SearchSetting> Membres
			int System.Collections.Generic.IComparer<SearchSetting>.Compare(SearchSetting x, SearchSetting y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.ID.CompareTo(x.ID);
				}
				else
				{
					return x.ID.CompareTo(y.ID);
				}
			}
			#endregion
		}
		public class SearchConditionComparer : System.Collections.Generic.IComparer<SearchSetting>
		{
			public SorterMode SorterMode;
			public SearchConditionComparer()
			{ }
			public SearchConditionComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<SearchSetting> Membres
			int System.Collections.Generic.IComparer<SearchSetting>.Compare(SearchSetting x, SearchSetting y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.SearchCondition.CompareTo(x.SearchCondition);
				}
				else
				{
					return x.SearchCondition.CompareTo(y.SearchCondition);
				}
			}
			#endregion
		}
		public class IsAddResultComparer : System.Collections.Generic.IComparer<SearchSetting>
		{
			public SorterMode SorterMode;
			public IsAddResultComparer()
			{ }
			public IsAddResultComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<SearchSetting> Membres
			int System.Collections.Generic.IComparer<SearchSetting>.Compare(SearchSetting x, SearchSetting y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.IsAddResult.CompareTo(x.IsAddResult);
				}
				else
				{
					return x.IsAddResult.CompareTo(y.IsAddResult);
				}
			}
			#endregion
		}
		public class IsOnResultComparer : System.Collections.Generic.IComparer<SearchSetting>
		{
			public SorterMode SorterMode;
			public IsOnResultComparer()
			{ }
			public IsOnResultComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<SearchSetting> Membres
			int System.Collections.Generic.IComparer<SearchSetting>.Compare(SearchSetting x, SearchSetting y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.IsOnResult.CompareTo(x.IsOnResult);
				}
				else
				{
					return x.IsOnResult.CompareTo(y.IsOnResult);
				}
			}
			#endregion
		}
	}
}
